import service from '@/utils/request';

// 获取设施列表
export function getFacilityList(data) {
  return service({
    url: `/api/system/space/findFacilityPage`,
    method: 'post',
    data,
  });
}

// 添加设施
export function addFacility(data) {
  return service({
    url: `/api/system/space/modifyFacility`,
    method: 'post',
    data,
  });
}

// 修改设施
export function modifyFacility(data) {
  return service({
    url: `/api/system/space/modifyFacility`,
    method: 'post',
    data,
  });
}

// 空间名称下拉
export function getSpaceList() {
  return service({
    url: `/api/system/space/spaceList`,
    method: 'post',
  });
}

// 删除设施
export function delFacility(id) {
  return service({
    url: `/api/system/space/deleteFacility?sysFacilityId=${id}`,
    method: 'get',
  });
}

// 获取设施详情
export function getFacilityDetails(id) {
  return service({
    url: `/api/system/space/findFacilityDetail?sysFacilityId=${id}`,
    method: 'get',
  });
}

